
const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Node)
    total_rank:cc.Node = null;

    @property(cc.Node)
    near_rank:cc.Node = null;

    @property(cc.Node)
    beyond_rank:cc.Node = null;

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {

    }

    /**
     * 
     * @param which_rank total_rank、near_rank、beyond_rank
     */
    rank_display(which_rank:string){  
        console.log('rank_display:',which_rank);      
        if(which_rank == 'total_rank')
        {
            this.total_rank.active = true;
        }
        else if(which_rank == 'near_rank')
        {
            this.near_rank.active = true;
        }
        else if(which_rank == 'beyond_rank')
        {
            this.beyond_rank.active = true;
        }
        else
        {
            console.error('rank value error')
        }
    }

   

    // update (dt) {}
}
